﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ERP.WH.Models.Entity;

[Table("wh_stock_out_detail")]
public partial class WhStockOutDetail
{
    [Key]
    public long DetailId { get; set; }

    public long StockOutId { get; set; }

    public long MaterialId { get; set; }

    public string? BatchNo { get; set; }

    public decimal RequiredQuantity { get; set; }

    /// <summary>
    /// 已分配数量
    /// </summary>
    public decimal? AllocatedQuantity { get; set; }

    /// <summary>
    /// 实际出库数量
    /// </summary>
    public decimal? ActualQuantity { get; set; }

    public string Unit { get; set; } = null!;

    public decimal? UnitPrice { get; set; }

    public decimal? Amount { get; set; }

    /// <summary>
    /// 来源库位
    /// </summary>
    public int? FromLocationId { get; set; }

    /// <summary>
    /// 0-待分配, 1-部分分配, 2-已分配, 3-部分出库, 4-已完成
    /// </summary>
    public sbyte? Status { get; set; }

    public string? Remark { get; set; }

    public DateTime? CreatedAt { get; set; }

    public DateTime? UpdatedAt { get; set; }

    public sbyte? IsDelete { get; set; }
}
